import request from '@/utils/request'
const  api_name= "/eduservice/video";


export default {
  //1. 新增小节
  saveVideoInfo(videoInfo) {
    return request({
      url: `${api_name}/save`,
      method: 'post',
      data: videoInfo
    })
  },
  //2. 小节详情
  getVideoInfoById(id) {
    return request({
      url: `${api_name}/${id}`,
      method: 'get'
    })
  },
  //3. 更新小节
  updateVideoInfoById(videoInfo) {
    return request({
      url: `${api_name}/updateVideo/${videoInfo.id}`,
      method: 'post',
      data: videoInfo
    })
  },
  //4. 删除小节
  removeById(id) {
    return request({
      url: `${api_name}/${id}`,
      method: 'delete'
    })
  }
}
